"use strict";
//函数定义
function sum(a, b) {
    return a + b;
}
console.log('sum: ' + sum(1, 1));
var strSum = function (a, b) {
    return parseInt(a + b);
};
console.log('strSum: ' + strSum('1', '1'));
function plus(a, b) {
    if (typeof a == 'string') {
        return parseInt(a) + parseInt(b);
    }
    else {
        return a + b;
    }
}
console.log('plus:' + plus(1, 1));
console.log('plus:' + plus('1', '1'));
